{% extends 'layout.html' %}

{% block content %}
    <div>
        <div class="container">

            <a href="/upload/model_form/" class="btn btn-primary"> <span class="glyphicon glyphicon-plus"
                                                                  aria-hidden="true"></span> 增加城市</a>
            <div class="bs-example" data-example-id="simple-table">
                <table class="table table-bordered">
                    <caption><span class="glyphicon glyphicon-list" aria-hidden="true"></span> 城市列表</caption>
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>城市</th>
                        <th>Logo</th>
                        <th>人口</th>
                    </tr>
                    </thead>
                    <tbody>
                    {% for item in departs %}
                        <tr>
                            <th scope="row">{{ item.id }}</th>
                            <td><img style="height: 70px" src="/media/{{ item.img }}"></td>
                            <td>{{ item.name }}</td>
                            <td>{{ item.count }}</td>
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </div>

            <ul class="pagination" style="float: left">
                {{ page_str }}

            </ul>
        </div>
    </div>



{% endblock %}